#include "stdafx.h"
#include "../GameCore/CGame.h"
#include <stdio.h>


void CGame::InitEx()
{
	_GameState =  k_GS_LOGO;
	_GameSubState = k_INIT;
}

void CGame::ReleaseEx()
{

}

void CGame::PauseEx()
{

}
void CGame::ResumeEx()
{
}
void CGame::UpdateAndRender()
{
	GL()->ClearClip();
	GL()->ClearScale();
	GL()->SetColor(0xffffff);
	switch (_GameState)
	{
		case k_GS_LOGO:
			UpdateLogo();
			RenderLogo();
			break;
		case k_GS_SPLASH:
			//_g->SetColor(0x00ffff);
			//_g->FillRect(0, 0, k_SCREEN_WIDTH, k_SCREEN_HEIGHT);
			//_sprite.DrawTexture(_g, _IMAGE_TYPE_DUCK, 0, 0);
			break;
		case k_GS_PLAYGAME:
			RenderGamePlay();
			UpdateGamePlay();
			break;
		case k_GS_ABOUT:
			//RenderAbout();
			//UpdateAbout();
			break;
		case k_GS_PAUSE:
			//RenderGamePlay();
			//UpdatePause();
			//RenderPause();
			break;
		case k_GS_RESULT:
			RenderResult();
			UpdateResult();
			break;
	}
}


void CGame::UpdateTouch(int xx, int yy, int touch_state, int touch_id, int tap_count)
{
	/*switch (_GameState)
	{
	
	}*/
}